local skel = fk.CreateSkill {
  name = "rmt__suifen",
}

Fk:loadTranslationTable{
  ["rmt__suifen"] = "燧愤",
  [":rmt__suifen"] = "每回合限一次，你使用普通锦囊牌时，可以对其中一名目标造成一点火焰伤害。此后你使用与之牌名相同的牌时，均具有为一的距离与次数限制。",
  ["@$rmt__suifen"] = "燧愤:限制牌",
  ["#rmt__suifen-choose"] = "燧愤：你可对一个目标造成1点火焰伤害，为【%arg】添加次数和距离限制",

  ["$rmt__suifen1"] = "孤光自照，肝肺皆冰雪。",
  ["$rmt__suifen2"] = "腰间剑、空埃蠹，竟何成？",
}

skel:addEffect(fk.CardUsing, {
  anim_type = "offensive",
  times = function (_, player)
    return 1 - player:usedSkillTimes(skel.name, Player.HistoryTurn)
  end,
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and data.card:isCommonTrick() and data.tos
    and table.find(data.tos, function(to) return to:isAlive() end)
    and player:usedSkillTimes(skel.name, Player.HistoryTurn) == 0
  end,
  on_cost = function (self, event, target, player, data)
    local tos = player.room:askToChoosePlayers(player, {
      min_num = 1, max_num = 1, targets = data.tos, skill_name = skel.name, cancelable = true,
      prompt = "#rmt__suifen-choose:::"..data.card.name,
    })
    if #tos > 0 then
      event:setCostData(self, {tos = tos})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local to = event:getCostData(self).tos[1]
    room:addTableMarkIfNeed(player, "@$rmt__suifen", data.card.name)
    room:damage { from = player, to = to, damage = 1, skillName = skel.name, damageType = fk.FireDamage }
  end,
})

skel:addLoseEffect(function (self, player, is_death)
  player.room:setPlayerMark(player, "@$rmt__suifen", 0)
end)

skel:addEffect("prohibit", {
  is_prohibited = function (self, player, to, card)
    if card and player and table.contains(player:getTableMark("@$rmt__suifen"), card.name) then
      --- 距离限制判断
      
      --- 次数限制判断
    end
  end,
})


return skel
